import request from '@/utils/request'

// 查询设施管理列表
export function listFacility(query) {
  return request({
    url: '/base/facility/list',
    method: 'get',
    params: query
  })
}

// 查询设施管理详细
export function getFacility(facilityId) {
  return request({
    url: '/base/facility/' + facilityId,
    method: 'get'
  })
}

// 新增设施管理
export function addFacility(data) {
  return request({
    url: '/base/facility',
    method: 'post',
    data: data
  })
}

// 修改设施管理
export function updateFacility(data) {
  return request({
    url: '/base/facility',
    method: 'put',
    data: data
  })
}

// 删除设施管理
export function delFacility(facilityId) {
  return request({
    url: '/base/facility/' + facilityId,
    method: 'delete'
  })
}


// 绑定
export function bindDevice(data) {
  return request({
    url: '/base/facility/bind',
    method: 'put',
    data: data
  })
}

export function unbindDevice(data) {
  return request({
    url: '/base/facility/unbind',
    method: 'put',
    data: data
  })
}
